package com.hae.shop.micoshoporderservice.mapper;

import com.hae.shop.micoshoporderservice.mapper.model.OrderDo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;

/**
 * 订单数据库通知
 */
public interface OrderMapper {

    @Insert("INSERT INTO order_info (USER_ID, GPPD_ID, MOBILE, ADDR, GOOD_AMOUNT, MOUNT, STATE, CREATED_TIME, UPDATED_TIME) " +
            "VALUES(#{userId}, #{goodId}, #{mobile}, #{addr}, #{goodAmout}, #{payAmount}, 1, now(), now())")
    @Options(useGeneratedKeys=true, keyProperty="orderId", keyColumn="ORDER_ID")
    int createOrder(OrderDo orderDo);
}
